/*
 * @Author: wanggaoyang wgy910528@163.com
 * @Date: 2022-08-11 23:04:03
 * @LastEditors: wanggaoyang wgy910528@163.com
 * @LastEditTime: 2022-08-11 23:07:44
 * @FilePath: \shop-admin\src\composables\util.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import {
    ElNotification,
    ElMessage,
    ElMessageBox
} from "element-plus";
import nprogress from "nprogress";
// 消息提示
export const toast = (message, type = "success",dangerouslyUseHTMLString=false) => {
    ElNotification({
        message,
        type,
        dangerouslyUseHTMLString,
        duration:3000
      })
}
export const showModal=(content="",type="warning",title="")=>{
    return  ElMessageBox.confirm(
        content,
        title,
        {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type,
        }
      )
}
//隐藏全屏loading
export const hideFullLoading=()=>{
  nprogress.done()
}
//显示全屏loading
export const showFullLoading=()=>{
  nprogress.start()
}